You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > BinomFit Method > Statistics.BinomFit Method ([In] TVec, double, [In] TVec, [In] TVec, [In] TVec, double)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.BinomFit Method ([In] TVec, double, [In] TVec, [In] TVec, [In] TVec, double)

Calculate parameters for binomial distributed values.

Syntax
C#
Visual Basic
public static void BinomFit([In] TVec X, double N, [In] TVec p, [In] TVec Low, [In] TVec High, double Alpha);
Parameters 
Description 
[In] TVec X 
Stores data which is assumed to be binomial distributed. 
double N 
Defines binomial distribution n parameter. 
[In] TVec p 
Returns binomial distribution p parameter, estimated at each X value. 
[In] TVec Low 
 
[In] TVec High 
p (1-Alpha)*100 percent confidence intervals. Each pair of Low and High values defines lower and upper CI for corresponding p value. 
double Alpha 
Confidence interval percentage. 

RandomBinom, BinomStat

The following example generates 100 random Weibull distributed values and then uses WeibullFit routine to extract used a and b parameters: The following example generates 100 binomial distributed values and then uses BinomFit routine to extract p parameter

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector vec1 = new Vector(1000, false); Vector LowInt = new Vector(0); Vector HighInt = new Vector(0); Vector p = new Vector(0); StatRandom.RandomBinom(35, 0.25, vec1, -1); // Now extract p-s and its 100*(1-Alpha) // confidence intervals. Statistics.BinomFit(vec1, 35, p, LowInt, HighInt, 0.05); // vector p holds the p for each element in vec1, // vectors LowInt and HighInt hold the lower and upper conf. int. limit // for each element in p } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!